package com.pasabahceambalaj.entity;

// Generated Oct 8, 2013 12:01:41 AM by Hibernate Tools 3.4.0.CR1

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Version;

import org.hibernate.validator.NotNull;

/**
 * Kalipaltkalip generated by hbm2java
 */
@Entity
@Table(name = "kalipaltkalip", catalog = "ambalaj")
public class Kalipaltkalip implements java.io.Serializable {

	private Long id;
	private int version;
	private Kalip kalip;
	private Kalip altKalip;
	private int altkalipadet;

	public Kalipaltkalip() {
	}

	public Kalipaltkalip(Kalip kalip, Kalip altKalip, int altkalipadet) {
		this.kalip = kalip;
		this.altKalip = altKalip;
		this.altkalipadet = altkalipadet;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Version
	@Column(name = "version", nullable = false)
	public int getVersion() {
		return this.version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "kalipid", nullable = false)
	@NotNull
	public Kalip getKalip() {
		return this.kalip;
	}

	public void setKalip(Kalip kalip) {
		this.kalip = kalip;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "altkalipid", nullable = false)
	@NotNull
	public Kalip getAltKalip() {
		return this.altKalip;
	}

	public void setAltKalip(Kalip altKalip) {
		this.altKalip = altKalip;
	}

	@Column(name = "altkalipadet", nullable = false)
	public int getAltkalipadet() {
		return this.altkalipadet;
	}

	public void setAltkalipadet(int altkalipadet) {
		this.altkalipadet = altkalipadet;
	}

}
